From cd6b3c5e99d371c08185aca6d333d0f0f278c666 Mon Sep 17 00:00:00 2001 From: justbur Date: Wed, 18 Nov 2015 22:04:29 -0500 Subject: [PATCH] Check for nil as a binding in previous commit --- which-key.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/which-key.el b/which-key.el index aaef402b459..7347fad3723 100644 --- a/which-key.el +++ b/which-key.el @@ -1124,8 +1124,9 @@ An empty stiring is returned if no title exists." (res (assoc key-lst alist)) (mode-alist (assq major-mode alist)) (mode-res (when mode-alist (assoc key-lst mode-alist))) - (alternate (when (symbolp (key-binding (apply #'vector key-lst))) - (symbol-name (key-binding (apply #'vector key-lst)))))) + (binding (key-binding (apply #'vector key-lst))) + (alternate (when (and binding (symbolp binding)) + (symbol-name binding)))) (cond (mode-res (cdr mode-res)) (res (cdr res)) ((and (eq which-key-show-prefix 'echo) alternate) -- 2.30.2